// ES11: 空值合并运算 ??

const foo = 0;
// const bar = foo || "default value"
const bar = 0 ?? "defualt value"; // 0
const bar1 = "" ?? "defualt value"; // ''
const bar2 = undefined ?? "defualt value"; // defualt value

console.log(bar);

// ts 是 js 的超级
